-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: Fixed incorrect stream size check (#14125) #15195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
can you add the test from the issue? |
I can, but a few things to consider first: So with that said, do you still want the original test? If so, in an external file or directly in the script? |
@jeffcarey oh if it replicates that is fine then. thanks! |
can you add a whatsnew note? ping when you push (as this is already validated). |
Current coverage is 85.97% (diff: 100%)
|
@jreback whatsnew note has been added. |
thanks @jeffcarey ! keep em coming! |
closes pandas-dev#14125 Previously, self->stream_cap was copied into a local variable called maxstreamsize each time tokenize_bytes ran, and then this was checked in the PUSH_CHAR macro. However, there is one other place in the file where function make_stream_space() is called (in end_line()), and when this happens self->stream_cap is increased but maxstreamsize is not updated, making the check incorrect. In rare circumstances (see original issue or test case) this could cause a crash. The resolution is to just check self->stream_cap directly. Author: Jeff Carey <[email protected]> Closes pandas-dev#15195 from jeffcarey/fix/14125 and squashes the following commits: d3c5f28 [Jeff Carey] BUG: Fixed incorrect stream size check (pandas-dev#14125)
git diff upstream/master | flake8 --diff
Issue summary: Previously, self->stream_cap was copied into a local variable called maxstreamsize each time tokenize_bytes ran, and then this was checked in the PUSH_CHAR macro. However, there is one other place in the file where function make_stream_space() is called (in end_line()), and when this happens self->stream_cap is increased but maxstreamsize is not updated, making the check incorrect. In rare circumstances (see original issue or test case) this could cause a crash. The resolution is to just check self->stream_cap directly.